package com.baiyun.yunpan.service.impl;

import com.baiyun.yunpan.dao.UserDao;
import com.baiyun.yunpan.entity.User;
import com.baiyun.yunpan.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Sam
 * @date 2021/5/22 21:20
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;
    @Override
    public void reg(User user) {
            userDao.reg(user);
    }

    @Override
    public User login(User user) {
        return userDao.login(user);
    }

    @Override
    public User getUserBy(int id) {
        return userDao.getUserById(id);
    }

    @Override
    public void uodate(User user) {
        userDao.uodate(user);
    }

    @Override
    public User getUserByName(User user) {
        return userDao.getUserByName(user);
    }
}
